<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS常用值</title>
    <style>
        h1 {
            color: red;
            color: rgb(255, 0, 0);
            color: rgb(0, 255, 255); /*反色*/
            color: rgb(0, 255, 0);
            color: rgb(0, 0, 255);
            color: rgb(0, 0, 0);
            color: rgb(255, 255, 255);

            color: #ff0000;
            color: #00ff00;
            color: #0000ff;
            color: #000000;
            color: #00f;

            /*带不透明度的颜色,1 完全不透明, 0 完全透明*/
            color: rgba(255, 0, 0, 1);
            color: rgba(0, 255, 0, 0.8);
            color: rgba(0, 255, 0, .5);
            color: rgba(0, 255, 0, .1);
        }

        .d1 {
            /*注意:插入背景图必须设置所在区域大小! */
            width: 50px;
            height: 100px;
            /*插入背景图*/
            background-image: url("img/mr.png");
            /*调整背景图大小 宽度高度*/
            background-size: 50px 100px;
            /*可以同时设置背景色没有图的地方显示背景色*/
            background-color: cyan;
        }
        .d2{
            /*500*300 5像素的红色边框插入鸣人背景图*/
            width: 500px;
            height: 300px;
            background-image: url("img/mr.png");
            border: 5px solid red;
            background-repeat: no-repeat;
            background-position: 0 0;
            /*background-position: 50px -50px;*/
            background-position: center center;
            /*background-position: center;*/
            /*background-position: 50% 50%;*/
        }
        .d3{
            width: 500px;
            height: 300px;
            /*渐变色 角度值(deg) 颜色1 颜色2 颜色3*/
            background-image:linear-gradient(30deg, red, yellow, green,#00ff00, blue);
        }
    </style>

</head>
<body>
<h1>测试1</h1>
<!-- .d*3 Tab补全-->
<div class="d1"></div>
<div class="d2"></div>
<div class="d3"></div>
</body>
</html>




















